package BinarysearchTree;

public class Text {
    public static void main(String[] args) {
        BinaryTree tree = new BinaryTree();
        tree.put(4,"赵六");
        tree.put(2,"王五");
        tree.put(3,"张三");
        tree.put(1,"李四");
        tree.put(5,"张麻子");
        System.out.println(tree.deleteRecursion(3));
        System.out.println(tree.get(3));

    }
    public static void main1(String[] args) {
        BinaryTree node = new BinaryTree();
        node.put(1,"李四");
        node.put(2,"王五");
        node.put(3,"超六");
        node.put(4,"张三");
        node.put(5,"张麻子");
        System.out.println(node.get(5));
        System.out.println(node.get(4));
        System.out.println(node.get(3));
        System.out.println(node.get(2));
        System.out.println(node.get(1));
        System.out.println();
        System.out.println(node.min());
        System.out.println(node.max());
        System.out.println(node.predecessor(1));
        System.out.println(node.successor(5));
    }
}
